import React, {Component} from 'react';
import {connect} from 'react-redux'
import Router from './configs/Router'
import {Spin} from 'antd';
import {seiLocale} from 'sei-utils';

const {seiIntl} = seiLocale;

class App extends Component {
  render() {
    return (
      <Spin tip={seiIntl.get({key: 'loading', desc: '加载中...'})} spinning={this.props.loadings}
            wrapperClassName={"spin"}>
        <Router/>
      </Spin>
    );
  }
}

const mapStateToProps = (state) => {
  return {
    loadings: state.SharedReducer.loadings
  }
}

export default connect(
  mapStateToProps
)(App)
